﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity;
using System.Linq;
using System.Web;

namespace MagicApp.Models
{
    public class CardJson
    {
        
        public string name { get; set; }
        public string manaCost { get; set; }
        public int cmc { get; set; }
        public List<string> colors { get; set; }
        public string type { get; set; }
        public List<string> supertypes { get; set; }
        public List<string> types { get; set; }
        public List<string> subtypes { get; set; }
        public string rarity { get; set; }
        public string text { get; set; }
        public string flavor { get; set; }
        public string artist { get; set; }
        public string number { get; set; }
        public string power { get; set; }
        public string toughness { get; set; }
        public string layout { get; set; }
        public int multiverseid { get; set; }
        public string imageName { get; set; }
        public string id { get; set; }
        
    }
    public class Card
    {
        [Key]
        public int multiverseID { get; set; }

        [DisplayName("Name")]
        public string name { get; set; }

        public string manaCost { get; set; }
        public int convManaCost { get; set; }
        public string colors { get; set; }

        [DisplayName("Type")]
        public string type { get; set; } //This string holds supertype + types + subtypes in one whole string
        public string supertype { get; set; }
        public string types { get; set; }
        public string subtypes { get; set; }

        [DisplayName("Rarity")]
        public string rarity { get; set; }

        public string text { get; set; }

        public string flavor { get; set; }

        public string artist { get; set; }

        public string number { get; set; }

        [DisplayName("Power")]
        public string power { get; set; }
        [DisplayName("Toughness")]
        public string toughness { get; set; }

        public string layout { get; set; }
        public string imageName { get; set; }
        public string id { get; set; }
    }

    public class CardDbContext : DbContext
    {
        public DbSet<Card> Cards { get; set; }
    }
}